<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUnitAuthTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //单位认证
        Schema::create('unit_auth', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->default(0)->comment('用户id');
            $table->integer('photo_id')->default(0)->comment('集团图片');
            $table->string('name')->nullable()->comment('单位名称');
            $table->string('province',64)->nullable()->comment('省份');
            $table->string('city',64)->nullable()->comment('城市');
            $table->string('area',64)->nullable()->comment('地区');
            $table->string('address')->nullable()->comment('详细地址');
            $table->string('uniform_social_credit_code')->nullable()->comment('统一社会信用代码');
            $table->string('contacts')->nullable()->comment('联系人');
            $table->string('contact_number')->nullable()->comment('单位固话');
            $table->string('contact_phone')->nullable()->comment('手机号');
            $table->string('license')->nullable()->comment('营业执照');
            $table->string('legal_person_name')->nullable()->comment('法人姓名');
            $table->integer('license_img_id')->default(0)->comment('营业执照照片');
            $table->integer('is_auth')->default(0)->comment('认证情况 0：未认证 1：通过 2：拒绝 3：注销认证');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
